<template>
	<div>
   <div class="modal">
     <div class="modal-bg"></div>
     <div class="data">
       <div class="rele-title">个人资料<span>X</span></div>
       <div class="data-left">
         <ul class="data-l-list">
           <li>
             <div class="data-l-title">员工姓名</div>
             <div class="data-l-input">
               <input type="" name="">
             </div>
           </li>
            <li>
             <div class="data-l-title">出生日期</div>
             <div class="data-l-input">
               <input type="" name="">
             </div>
           </li>
            <li>
             <div class="data-l-title">入职时间</div>
             <div class="data-l-input">
               <input type="" name="">
             </div>
           </li>
            <li>
             <div class="data-l-title">登录密码</div>
             <div class="data-l-input">
               <input type="password" name="">
             </div>
           </li>
            <li>
             <div class="data-l-title">手机号码</div>
             <div class="data-l-input">
               <input type="password" name="">
             </div>
           </li>
             <li>
             <div class="data-l-title">性别</div>
             <div class="data-l-input">
               <el-radio v-model="radio" label="1">男</el-radio>
               <el-radio v-model="radio" label="2">女</el-radio>
             </div>
           </li>
            <li>
             <div class="data-l-title">身份证</div>
             <div class="data-l-input">
               <input type="password" name="">
             </div>
           </li>
            <li>
             <div class="data-l-title">邮箱</div>
             <div class="data-l-input">
               <input type="password" name="">
             </div>
           </li>
            <li>
             <div class="data-l-title">QQ</div>
             <div class="data-l-input">
               <input type="password" name="">
             </div>
           </li>
            <li>
             <div class="data-l-title">微信</div>
             <div class="data-l-input">
               <input type="password" name="">
             </div>
           </li>
            <li>
             <div class="data-l-title">家庭住址</div>
             <div class="data-l-input">
               <input type="password" name="">
             </div>
           </li>
            <li>
             <div class="data-l-title">执业资格</div>
             <div class="data-l-input">
               <input type="password" name="">
             </div>
           </li>
           </ul>
           <ul class="data-l-list data-l-list1">
             <li>
             <div class="data-l-title">账户类型</div>
             <div class="data-l-input">
              <el-radio v-model="radiotype" label="1">银行卡</el-radio>
               <el-radio v-model="radiotype" label="2">支付宝</el-radio>
             </div>
           </li>
           <li>
             <div class="data-l-title">开户行</div>
             <div class="data-l-input">
               <input type="password" name="">
             </div>
           </li>
           <li>
             <div class="data-l-title">账号</div>
             <div class="data-l-input">
               <input type="password" name="">
             </div>
           </li>
           <li>
             <div class="data-l-title">账号名</div>
             <div class="data-l-input">
               <input type="password" name="">
             </div>
           </li>
         </ul>
       </div>
       <div class="data-right">
         <div class="data-right-li">
           <div class="data-right-title">员工照片</div>
           <el-upload
  class="avatar-uploader"
  action="https://jsonplaceholder.typicode.com/posts/"
  :show-file-list="false"
  :on-success="handleAvatarSuccess"
  :before-upload="beforeAvatarUpload">
  <img v-if="imageUrl" :src="imageUrl" class="avatar">
  <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
         </div>
         <div class="data-right-li">
           <div class="data-right-title">职业资格证书</div>
           <el-upload
  class="avatar-uploader"
  action="https://jsonplaceholder.typicode.com/posts/"
  :show-file-list="false"
  :on-success="handleAvatarSuccess"
  :before-upload="beforeAvatarUpload">
  <img v-if="imageUrl" :src="imageUrl" class="avatar">
  <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
         </div>
       </div>
       <div class="line"></div>
       <div class="info">
         <div class="info-title">职务信息</div>
         <ul class="info-list">
           <li>
             <div class="info-name">公司</div>
             <div class="info-input"><input type="" name=""></div>
           </li>
            <li>
             <div class="info-name">区域</div>
             <div class="info-input"><input type="" name=""></div>
           </li>
            <li>
             <div class="info-name">门店</div>
             <div class="info-input"><el-select v-model="storevalue" placeholder="请选择" style="width:80%">
    <el-option
      v-for="item in store"
      :key="item.storevalue"
      :label="item.label"
      :value="item.storevalue">
    </el-option>
  </el-select></div>
           </li>
            <li>
             <div class="info-name">小组</div>
             <div class="info-input"><el-select v-model="groupvalue" placeholder="请选择" style="width:80%">
    <el-option
      v-for="item in group"
      :key="item.groupvalue"
      :label="item.label"
      :value="item.groupvalue">
    </el-option>
  </el-select></div>
           </li>
            <li>
             <div class="info-name">角色</div>
             <div class="info-input"><el-select v-model="rolevalue" placeholder="请选择" style="width:80%">
    <el-option
      v-for="item in role"
      :key="item.rolevalue"
      :label="item.label"
      :value="item.rolevalue">
    </el-option>
  </el-select></div>
           </li>
            <li>
             <div class="info-name">考勤规则</div>
             <div class="info-input"><el-select v-model="rulevalue" placeholder="请选择" style="width:80%">
    <el-option
      v-for="item in rule"
      :key="item.rulevalue"
      :label="item.label"
      :value="item.rulevalue">
    </el-option>
  </el-select></div>
           </li>
           <li style="width:100%;">
             <button>保存</button><button>取消</button>
           </li>
         </ul>
       </div>
     </div>
   </div>
	</div>
</template>
<script type="text/babel">
    export default {
	    data () {
	      return {
          radio: '1',
          radiotype: '1',
          imageUrl: '',
          // 门店
          storevalue:'',
           store: [{
          storevalue: '选项1',
          label: '黄金糕'
        }, ],
        // 小组
          groupvalue:'',
           group: [{
          groupvalue: '选项1',
          label: '黄金糕'
        }, ],
        //角色
          rolevalue:'',
           role: [{
          rolevalue: '选项1',
          label: '黄金糕'
        }, ],
         //考勤规则
          rulevalue:'',
           rule: [{
          rulevalue: '选项1',
          label: '黄金糕'
        }, ]
	}
  },
  methods: {
      handleAvatarSuccess(res, file) {
        this.imageUrl = URL.createObjectURL(file.raw);
      },
      beforeAvatarUpload(file) {
        const isJPG = file.type === 'image/jpeg';
        const isLt2M = file.size / 1024 / 1024 < 2;
        if (!isJPG) {
          this.$message.error('上传头像图片只能是 JPG 格式!');
        }
        if (!isLt2M) {
          this.$message.error('上传头像图片大小不能超过 2MB!');
        }
        return isJPG && isLt2M;
      }
    },
}
</script>

<style scoped>
.data-l-list1{
  margin-top: 10px;
  box-sizing: border-box;
  border-top: 5px solid #f9f9f9;
}
.info-name{
  width: 20%;
  float: left;
   line-height: 27px;
  text-align: center;
}
.info-input{width:80%;
float: left;}
.info-input input{
  width: 80%;
  line-height: 27px;
  border-radius: 5px;
  border:1px solid #d3d3d3;
}
.info-list{
  width: 100%;
  float: left;
}
.info-list li button{
  margin-top: 10px;
  padding: 10px 30px;
  border-radius: 5px;
  float: left;
  background: #ed7d31;
  border:none;
  color: #ffffff;
}
.info-list li button:nth-child(2){
  float: right;
}
.info-list li{
  margin-top: 10px;
  width: 50%;
  float: left;
}
.info-title{
  line-height: 40px;
  font-weight: bold;
}
.info{
  width: 94%;
  padding: 0 3%;
  float: left;
}
.line{
  width: 100%;
  height: 5px;

  background: #f9f9f9;
  float: left;
}
.data-right-title{
  text-align: center;
  margin: 20px 0;

}
.data-right-li{
  width: 100%;
  float: left;
}
.data-right{
  width: 35%;
  text-align: center;

  float: right;
}
.data-l-input input{
  width:90%;
  float: left;
  box-sizing: border-box;
  line-height: 27px;
  border-radius: 5px;
  border:1px solid #d3d3d3;
  margin-right: 5px;
}
.data-l-input{
  overflow: hidden;
  width: 60%;
  line-height: 27px;
  float: left;
}
.data-l-title{
  width: 40%;
  line-height: 27px;
  float: left;
  text-align: center;
}
.data-l-list{
  width: 100%;
  float: left;
}
.data-l-list li{
  margin-top: 10px;
  width:50%;
  float: left;
  height: 28px;
}
.data-left{
  width: 65%;
  padding-top:10px;
  padding-bottom: 20px;
  float: left;
  box-sizing: border-box;
  border-right: 5px solid #f9f9f9;
}
.data{
  float: left;
  width: 40%;
  position: absolute;
  top: 10%;
  background: #ffffff;
  height: 610px;
  z-index: 10;
  overflow:hidden;
  border-radius: 5px;
  left:30%;
  overflow-y: auto;
}
</style>
